<?php
	DEFINE('H1', 'MySQLI Test 1');
	DEFINE('TITLE','MySQLI Test 1');
	require('includes/header.php');
	require_once('db/DBparms.php');
?>	
	<h2><?PHP echo H1 ?></h2>

<?php

	$mysqli = new mysqli(DBHOST, DBUSER, DBPWD, "appl");
	
		$result = $mysqli->query("Select id, username, security_token from users");
		
		echo "Returned" . $result->num_rows . " rows.<br />";
		$row = $result->fetch_array();
		echo "Array access: 0 is $row[0]; 1 is $row[1]; 2 is $row[2] <br />";
		echo "Array access: 'id' is " . $row['id'] . "; 'username' is " . $row['username'] . "; 'security_token' is " . $row['security_token']." <br />";
		
		
	$mysqli->close();

?>

<?php
	require('includes/footer.php');
?>